﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

public class XString
{
    public static String Truncate(String s, int max)
    {
        if (s.Length > max)
        {
            return s.Substring(0, max) + "...";
        }
        return s;
    }
}